package gui.impianto;
import com.toedter.calendar.JDateChooser;

import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;

import javax.swing.WindowConstants;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ModificaManutenzioneJPanel extends javax.swing.JPanel {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

	private JPanel infojPanel;
	private JDateChooser datajDateChooser;
	private JLabel datajLabel;
	private JTextField codicejTextField;
	private JLabel codicejLabel;
	private JPanel riga1jPanel;
	private JLabel descrizionejLabel;
	private JButton chiudijButton;
	private JButton salvaModifichejButton;
	private JPanel pulsantijPanel;
	private JTextArea notejTextArea;
	private JLabel notejLabel;
	private JPanel riga3jPanel;
	private JPanel riga2jPanel;
	private JTextField descrizioneTextField;
	private JTextField prezzojTextField;
	private JLabel prezzojLabel;
	private JPanel manutenzionejPanel;
	private JLabel impiantojLabel;
	private JLabel comuneImpiantojLabel;
	private JLabel indirizzoImpiantojLabel;
	private JLabel clientejLabel;
	private JLabel logojLabel;
	private JPanel logojPanel;
	
	/**
	 * This field is used to keep the code of manutenzione
	 */
	private String codiceManutenzione;

	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.
	*/
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new ModificaManutenzioneJPanel("codice"));
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}
	
	public ModificaManutenzioneJPanel(String codiceManutenzione) {
		super();
		this.codiceManutenzione = codiceManutenzione;
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.setPreferredSize(new java.awt.Dimension(400, 383));
			{
				infojPanel = new JPanel();
				GridBagLayout infojPanelLayout = new GridBagLayout();
				this.add(infojPanel);
				infojPanel.setPreferredSize(new java.awt.Dimension(230, 135));
				infojPanel.setBorder(BorderFactory.createTitledBorder("Info Impianto"));
				infojPanelLayout.rowWeights = new double[] {0.1, 0.1, 0.1, 0.1};
				infojPanelLayout.rowHeights = new int[] {7, 7, 7, 7};
				infojPanelLayout.columnWeights = new double[] {0.1};
				infojPanelLayout.columnWidths = new int[] {7};
				infojPanel.setLayout(infojPanelLayout);
				{
					clientejLabel = new JLabel();
					infojPanel.add(clientejLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					clientejLabel.setText("Cognome Nome (id)");
					clientejLabel.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					indirizzoImpiantojLabel = new JLabel();
					infojPanel.add(indirizzoImpiantojLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					indirizzoImpiantojLabel.setText("Via Indirizzo Impianto, numero");
					indirizzoImpiantojLabel.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					comuneImpiantojLabel = new JLabel();
					infojPanel.add(comuneImpiantojLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					comuneImpiantojLabel.setText("CAP - Comune Impianto (PR)");
					comuneImpiantojLabel.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					impiantojLabel = new JLabel();
					infojPanel.add(impiantojLabel, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					impiantojLabel.setText("Matricola Modello (Costruttore)");
					impiantojLabel.setFont(new java.awt.Font("Segoe UI",3,12));
				}
			}
			{
				logojPanel = new JPanel();
				this.add(logojPanel);
				logojPanel.setPreferredSize(new java.awt.Dimension(140, 134));
				{
					logojLabel = new JLabel();
					logojPanel.add(logojLabel);
					logojLabel.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/manutenzione128.png")));
				}
			}
			{
				manutenzionejPanel = new JPanel();
				GridBagLayout manutenzionejPanelLayout = new GridBagLayout();
				this.add(manutenzionejPanel);
				manutenzionejPanel.setPreferredSize(new java.awt.Dimension(372, 184));
				manutenzionejPanel.setBorder(BorderFactory.createTitledBorder("Dati Manutenzione"));
				manutenzionejPanelLayout.rowWeights = new double[] {0.1, 0.1, 0.1};
				manutenzionejPanelLayout.rowHeights = new int[] {7, 7, 7};
				manutenzionejPanelLayout.columnWeights = new double[] {0.1};
				manutenzionejPanelLayout.columnWidths = new int[] {7};
				manutenzionejPanel.setLayout(manutenzionejPanelLayout);
				{
					riga1jPanel = new JPanel();
					manutenzionejPanel.add(riga1jPanel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					{
						codicejLabel = new JLabel();
						riga1jPanel.add(codicejLabel);
						codicejLabel.setText("Codice");
						codicejLabel.setFont(new java.awt.Font("Segoe UI",3,12));
					}
					{
						codicejTextField = new JTextField();
						riga1jPanel.add(codicejTextField);
						codicejTextField.setPreferredSize(new java.awt.Dimension(52, 23));
						codicejTextField.setEditable(false);
					}
					{
						datajLabel = new JLabel();
						riga1jPanel.add(datajLabel);
						datajLabel.setText("Data");
						datajLabel.setFont(new java.awt.Font("Segoe UI",3,12));
					}
					{
						datajDateChooser = new JDateChooser();
						riga1jPanel.add(datajDateChooser);
					}
					{
						prezzojLabel = new JLabel();
						riga1jPanel.add(prezzojLabel);
						prezzojLabel.setText("Prezzo");
						prezzojLabel.setFont(new java.awt.Font("Segoe UI",3,12));
					}
					{
						prezzojTextField = new JTextField();
						riga1jPanel.add(prezzojTextField);
						prezzojTextField.setPreferredSize(new java.awt.Dimension(58, 23));
					}
				}
				{
					riga2jPanel = new JPanel();
					manutenzionejPanel.add(riga2jPanel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					{
						descrizionejLabel = new JLabel();
						riga2jPanel.add(descrizionejLabel);
						descrizionejLabel.setText("Descrizione");
						descrizionejLabel.setFont(new java.awt.Font("Segoe UI",3,12));
					}
					{
						descrizioneTextField = new JTextField();
						riga2jPanel.add(descrizioneTextField);
						descrizioneTextField.setPreferredSize(new java.awt.Dimension(269, 23));
					}
				}
				{
					riga3jPanel = new JPanel();
					manutenzionejPanel.add(riga3jPanel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
					{
						notejLabel = new JLabel();
						riga3jPanel.add(notejLabel);
						notejLabel.setText("Note");
						notejLabel.setFont(new java.awt.Font("Segoe UI",3,12));
					}
					{
						notejTextArea = new JTextArea();
						riga3jPanel.add(notejTextArea);
						notejTextArea.setPreferredSize(new java.awt.Dimension(301, 69));
					}
				}
			}
			{
				pulsantijPanel = new JPanel();
				this.add(pulsantijPanel);
				pulsantijPanel.setPreferredSize(new java.awt.Dimension(364, 45));
				{
					salvaModifichejButton = new JButton();
					pulsantijPanel.add(salvaModifichejButton);
					salvaModifichejButton.setText("Salva Modifiche");
					salvaModifichejButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/save-icon32.png")));
				}
				{
					chiudijButton = new JButton();
					pulsantijPanel.add(chiudijButton);
					chiudijButton.setText("Chiudi Finestra (Annulla)");
					chiudijButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/close32.png")));
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
